<?php
namespace Home\Controller;
use Think\Controller;
use Common\Controller\CommonController;
class SystemController extends CommonController {    
	public function index(){      	
		$this->display();
    }
    public function doxiugai(){
    	if(isset($_POST['name'])||isset($_POST['pwd'])){
    		$this->error('请填写正确的数据！');
    	}
    	$user = $_POST['name'];
    	$pwd = md5($_POST['pwd']);    	
    	$update = array(
    			'id' => 1,
    			'user' => $user,
    			'pwd' => $pwd
    	);
    	$m = M('user')->save($update);
    	if($m){
    		$this->success('修改成功');
    	}else{
    		$this->error('修改失败');
    	}
    }
}